/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-25 19:34:30
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-25 19:39:38
 * @别瞎看: 你个无脑牛马
 */
/**
 * Tset02Split
 */
public class Test02Split {
    public static void main(String[] args) {
        String str="apple,banana,orange";
        //以下两行代码效果一样
        //String[] friuts=str.split(",");
        // String[] friuts=str.split(",",0);
        String[] fruits=str.split(",",4);
        for(String fruit : fruits){
            System.out.println(fruit);
        }

    }
}